Plugins must not depend on external packages like Linux .deb or MacOS homebrew packages to work (since end users don't have them installed). This means that a plugin which depends on an external library not available by just installing OpenCPN must handle this in various other ways like:
The photolayer_pi plugin contains examples on all these strategies. The proj and libgeotiff libs are rebuilt from sources. The libtiff library is bundled on Debian and linked statically on MacOS. The “rebuild from source” is done in libs/geotiff and the flatpak yaml manifest.
To check the dependencies of a plugin there are the otool -L (MacOS) and ldd (Linux) tools which lists the runtime dependencies of a plugin. By default, these are run on all photolayer macos and debian builds. The MacOS output is relatively easy to read while the ldd output probably is too messy for regular checks. It might be useful when debugging. though.